package org.gis.mapserver.suppliers.layers.empty;

import org.gis.mapserver.adapter.SourceAdapterFactory;
import org.common.base.UniqueID;
import org.gis.mapserver.layer.AbstractLayer;
import org.gis.mapserver.rendercontext.RenderingContext;
import org.gis.mapserver.source.Source;
import org.gis.mapserver.suppliers.adapters.RasterImageSourceAdapter;


/**
 *
 * @author gus
 */
public class DefaultLayer extends AbstractLayer
{

    @Override
    protected void doRender( RenderingContext context, Source source ) throws Exception
    {
        RasterImageSourceAdapter adapter = SourceAdapterFactory.getRasterImageSourceAdapter(source);
        context.drawImage(adapter.getImage(), 0, 0);
    }

    @Override
    public void afterInitialize() throws Exception
    {
        super.afterInitialize();
    }

    @Override
    public UniqueID getLayerType()
    {
        return new UniqueID("021e99d2-8def-4254-bedf-8418f1b3a080");
    }
}
